package com.taylor.spring5.factoryBean;

import com.taylor.spring5.entity.User;
import org.springframework.beans.factory.FactoryBean;

import javax.jws.soap.SOAPBinding;

/**
 * @author taylor
 * @Description: 工厂bean的实现
 * @date 2021/4/2 23:00
 */
public class MyFactoryBean implements FactoryBean<User> {

    @Override
    public User getObject() throws Exception {
        User user = new User();
        user.setBauthor("taylor");
        user.setBname("spring源码分析");
        return user;
    }

    @Override
    public Class<?> getObjectType() {
        return null;
    }

    @Override
    public boolean isSingleton() {
        return false;
    }
}
